<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对象的增删改查</title>
</head>
<body>
    <script>

        var obj = {
            'name':'jack',
            age:18,
            'aaa$bbb':'test',
            1:666
        }

    //   obj.sex = 1
    //   alert(obj.sex)
    // alert(obj['1'])
    // delete obj['1']
    // alert(obj['1'])
    // alert(obj['aaa$bbb'])
    // obj['aaa$bbb'] = 888
    // alert(obj['aaa$bbb'])
    // var a = 2

    // alert(obj[a]) // 因为不存在这个键名 所以报undefined错误




    </script>
</body>
</html>